import React from 'react';
import './index.css';
import Protrait from '../Protrait';
import Blank from '../Blank';

export default class  extends React.Component {
    constructor(props){
        super();
        this.state={
            portrait:props.portrait,//头像
            name:props.name,
            text:props.text,
            time:props.time,
            isReply:props.isReply
        }
    }
    //评论
    render(){
        return (
            <div className={this.state.isReply?"CommentContainer GrayBG CommentContainer_Comment_Padding":"CommentContainer"}>
               <div className="CommentContainer_Comment">
                   <div className="CommentContainer_CommentLeft ">
                       <Protrait src={this.state.portrait}/>
                   </div>
                   <div className="CommentContainer_CommentRight">
                       <div className="flexContainer ">
                            <span className="CommentContainer_CommentRight_UserName">{this.state.name}</span>
                            <Blank/>
                            <span>{this.state.time}</span>
                       </div>
                       <div className="Word_Wrap">{this.state.text}</div>
                   </div>
               </div>
            </div>
        );
    }
}
